#include "Button.h"

Button::Button(int x, int y, int width, int height) : m_X(x), m_Y(y),
													  m_Width(width), m_Height(height)
{
}

void Button::setButton(int x, int y, int width, int height)
{
	m_X = x;
	m_Y = y;
	m_Width = width;
	m_Height = height;
}

bool Button::isClicked(int mouseX, int mouseY)
{
	if (mouseY >= m_Y)
		if (mouseX >= m_X)
			if (mouseX <= m_X + m_Width)
				if (mouseY <= m_Y + m_Height)
					return 1;

	return 0;
}